//
//  SecondTableViewCell.m
//  HappilyLoan
//
//  Created by 纵情向前 on 2017/4/22.
//  Copyright © 2017年 zongqingxiangqian. All rights reserved.
//

#import "SecondTableViewCell.h"
#import "PublicClass.h"
@implementation SecondTableViewCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self setAboutMyInvesment];
    }
    return self;
}
- (void)setAboutMyInvesment{
    [self.contentView addSubview:self.titleLabel];
    [self.contentView addSubview:self.timeLabel];
    [self.contentView addSubview:self.readNumberLabel];
    [self.contentView addSubview:self.detailImage];
}
- (UILabel *)titleLabel{
    if (!_titleLabel) {
        _titleLabel = [[UILabel alloc] init];
        _titleLabel.frame = CGRectMake(ADAPTATION_WIDTH(20), ADAPTATION_HEIGHT(10), ADAPTATION_WIDTH(210), ADAPTATION_HEIGHT(50));
        _titleLabel.font = [UIFont systemFontOfSize:15];
        _titleLabel.textColor = [UIColor blackColor];
        _titleLabel.textAlignment = NSTextAlignmentLeft;
        _titleLabel.numberOfLines = 0;
        _titleLabel.backgroundColor = [UIColor clearColor];
    }
    return _titleLabel;
}
- (UILabel *)timeLabel{
    if (!_timeLabel) {
        _timeLabel = [[UILabel alloc]initWithFrame:CGRectMake(ADAPTATION_WIDTH(20), ADAPTATION_HEIGHT(70), ADAPTATION_WIDTH(120), 14/H)];
        _timeLabel.font = [UIFont systemFontOfSize:14];
        _timeLabel.textAlignment = NSTextAlignmentLeft;
        _timeLabel.textColor = [UIColor lightGrayColor];
        _timeLabel.backgroundColor = [UIColor clearColor];
    }
    return _timeLabel;
}
- (UILabel *)readNumberLabel{
    if (!_readNumberLabel) {
        _readNumberLabel = [[UILabel alloc]initWithFrame:CGRectMake(ADAPTATION_WIDTH(160), 70/H,ADAPTATION_WIDTH(70), 14/H)];
        _readNumberLabel.font = [UIFont systemFontOfSize:14];
        _readNumberLabel.textAlignment = NSTextAlignmentLeft;
        _readNumberLabel.adjustsFontSizeToFitWidth = YES;
        _readNumberLabel.backgroundColor = [UIColor clearColor];
        _readNumberLabel.textColor = [UIColor lightGrayColor];
    }
    return _readNumberLabel;
}
- (UIImageView *)detailImage{
    if (!_detailImage) {
        _detailImage = [[UIImageView alloc]initWithFrame:CGRectMake(ADAPTATION_WIDTH(255), ADAPTATION_HEIGHT(10), ADAPTATION_WIDTH(95), ADAPTATION_HEIGHT(73))];
        _detailImage.backgroundColor = [UIColor redColor];
    }
    return _detailImage;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
